package me.notfirecodes.suicidehunt;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.FoodLevelChangeEvent;
import org.bukkit.plugin.java.JavaPlugin;

public final class Suicidehunt extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        getCommand("suicidehunt").setExecutor(new SuicideHuntCMD());
        getCommand("endhunt").setExecutor(new EndHuntCMD());
        getCommand("restock").setExecutor(new RestockCMD());
        getServer().getPluginManager().registerEvents(new SuicideHuntCMD(), this);
        getServer().getPluginManager().registerEvents(this, this);
    }

    @Override
    public void onDisable() {
    }

    @EventHandler
    public void onHungerDepletion(FoodLevelChangeEvent e){
        e.setCancelled(true);
    }
}
